package com.jinzheng.model;

import com.jinzheng.constants.PetConstant;

/**
 * @author Administrator
 * @date 2020/12/30 9:12
 * @description
 **/
public class Dog extends Pet {
    private Integer wight;      //体重

    public Dog(){

    }

    public Integer getWight() {
        return wight;
    }

    public void setWight(Integer wight) {
        if (wight>= PetConstant.DOG_WEIGHT){
            wight = PetConstant.DOG_WEIGHT;
        }
        this.wight = wight;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "，name=" + super.getName() +'\'' +
                "，strain=" + super.getStrain() +'\'' +
                "，living=" + super.getLiving() +'\'' +
                "，wight=" + wight +
                '}';
    }
}
